<body text="#000000" link="#0000ff" bgcolor="#ffffff"><center><table width="80%">
<tr><td><h1>picocom</h1>
<h2>minimal dumb-terminal emulation program</h2>

  
  <h2>Synopsis</h2>
<b>
    picocom [ <em>options</em> ] <em>device</em><br>

  </b>

  
  <h2>Description</h2>


    <p>
      As its name suggests, picocom is a minimal
      dumb-terminal emulation program. It is, in principle, very much
      like <b>minicom (1)</b>, only it's &quot;pico&quot;
      instead of &quot;mini&quot;! It was designed to serve as a simple, manual,
      modem configuration, testing, and debugging tool. It has also
      served (quite well) as a low-tech &quot;terminal-window&quot; to allow
      operator intervention in PPP connection scripts (something like
      the ms-windows &quot;open terminal window before / after dialing&quot;
      feature). It could also prove useful in many other similar
      tasks.
    </p>

    <p>
      When picocom starts it opens the terminal (serial
      device) given as its non-option argument. Unless the
      <em>--noinit</em> option is given, it configures the device to
      the settings specified by the option-arguments (or to some
      default settings), and sets it to &quot;raw&quot; mode. If
      <em>--noinit</em> is given, the initialization and
      configuration is skipped; the device is just opened. Following
      this, picocom sets the standard-input and
      standard-output to raw mode. Having done so, it goes in a loop
      where it listens for input from stdin, or from the serial
      port. Input from the serial port is copied to the standard
      output while input from the standard input is copied to the
      serial port. picocom also scans its input stream for
      a user-specified control character, called the &quot;escape
      character&quot; (being by default &quot;C-a&quot;). If the escape character is
      seen, then instead of sending it to the serial-device, the
      program enters &quot;command mode&quot; and waits for the next character
      (which is called the &quot;function character&quot;). Depending on the
      value of the function character, picocom performs one
      of the operations described in the &quot;Commands&quot; section below.
    </p>
  

  
  <h2>COMMANDS</h2>


    <p>
      Commands are given to picocom by first keying the &quot;espace
      character&quot; which by default is &quot;C-a&quot; (see &quot;Options&quot; below on how
      to change it), and then keying one for the function (command)
      characters shown here.
    </p>
    
    <p>
      [escape character]: Send the escape character to the serial port
      and return to &quot;transparent&quot; mode. This means that if the escape
      character (&quot;C-a&quot;, by default) is typed twice, the program sends
      the escape character to the serial port, and remains in
      transparent mode. This is a new behavior implemented in
      v1.4. Previously picocom used to ignore the escape-character
      when it was entered as a function character.
    </p>

    <p>
      [C-x]: Exit the program: if the <em>--noreset</em> option was
      not given then the serial port is reset to its original settings
      before exiting; if it was given the serial port is not reset.
    </p>

    <p>
      [C-q]: Quit the program *without* reseting the serial port,
      regardless of the <em>--noreset</em> option.
    </p>
	
    <p>
      [C-p]: Pulse the DTR line. Lower it for 1 sec, and then raise it
      again.
    </p>

    <p>
      [C-t]: Toggle the DTR line. If DTR is up, then lower it. If it
      is down, then raise it.
    </p>

    <p>
      [C-backslash]: Generate a break sequence on the serial line. A
      break sequence is usually generated by marking (driving to
      logical one) the serial Tx line for an amount of time
      coresponding to several character durations.
    </p>

    <p>
      [C-u]: Baud up. Increase the baud-rate. The list of baud-rates
      stepped-through by this command is: 50, 75, 110, 134, 150, 200,
      300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600,
      115200. If HIGH_BAUD support is compiled in, then the following
      baud-rates are also added to the list: 230400, 460800, 500000,
      576000, 921600, 1000000, 1152000, 1500000, 2000000, 2500000,
      3000000, 3500000, 4000000. Depending on you system, any of the
      higher baud rates may be missing.
    </p>
    
    <p>
      [C-d]: Baud down. Decrease the baud-rate. The list of baud-rates
      stepped-through by this command is the same as for the &quot;baud-up&quot;
      command.
    </p>

    <p>
      [C-f]: Cycle through flow-control settings (RTS/CTS, XON/XOFF,
      none).
    </p>

    <p>
      [C-y]: Cycle through parity settings (even, odd, none).
    </p>

    <p>
      [C-b]: Cycle through databits-number settings (5, 6, 7, 8).
    </p>

    <p>
      [C-c]: Toggle local-echo mode.
    </p>

    <p>
      [C-v]: Show program options (like baud rate, data bits,
      etc). Only the options that can be modified online (through
      commands) are shown, not those that can only be set at the
      command-line.
    </p>

    <p>
      [C-s]: Send (upload) a file (see &quot;Sending and Receiving Files&quot;
      below)
    </p>
      
    <p>
      [C-r]: Receive (download) a file (see &quot;Sending and Receiving
      Files&quot; below)
    </p>

    <p>
      After performing one of the above operations the program leaves
      the command mode and enters transparent mode. Example: To
      increase the baud-rate by two steps, you have to type:
    </p>
    <p>
      C-a, C-u, C-a, C-u
    </p>
    <p>
      assuming of-course that &quot;C-a&quot; is the escape character.
    </p>
  


  <h2>SENDING AND RECEIVING FILES</h2>

    <p>
      picocom can send and receive files over the serial port
      using external programs that implement the respective
      protocols. In Linux typical programs for this purpose are:
    </p>

     <p><b>rx (1)</b> 
     - receive using the X-MODEM protocol</p>
     <p><b>rb (1)</b> 
     - receive using the Y-MODEM protocol</p>
     <p><b>rz (1)</b> 
     - receive using the Z-MODEM protocol</p>
     <p><b>sx (1)</b> 
     - send using the X-MODEM protocol</p>
     <p><b>sb (1)</b> 
     - send using the Y-MODEM protocol</p>
     <p><b>sz (1)</b> 
     - send using the Z-MODEM protocol</p>
     <p><b>ascii-xfr (1)</b> 
     - receive or transmit ASCII files</p>
    
    <p>
      The name of, and the command-line options to, the program to be
      used for transmitting files are given by the
      <em>--send-cmd</em> option. Similarly the program to receive
      files, and its argumets, are given by the
      <em>--receive-cmd</em> option. For example, in order to start
      a picocom session that uses &quot;sz&quot; to transmit files, and
      &quot;rz&quot; to receive, you have to say something like this:
    </p>

    <p>
      picocom --send-cmd &quot;sz -vv&quot; --receive-cmd &quot;rz -vv&quot;
    </p>

    <p>
      During the picocom session, if you key the &quot;send&quot; or &quot;receive&quot;
      commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be
      prompted for a filename. At this prompt you can enter one or
      more file-names, and any additional arguments to the
      transmission or reception program. Command-line editing and
      pathname completion are available at this prompt, if you have
      compiled picocom with support for the linenoise
      library. Pressing 'C-c' at this prompt will cancel the file
      transfer command and return to normal picocom
      operation. After entering a filename (and / or additional
      transmission or reception program arguments) and assuming you
      have not canceled the operation by pressing C-c, picocom will
      start the the external program as specified by the
      <em>--send-cmd</em>, or <em>--receive-cmd</em> option, and
      with any filenames and additional arguments you may have
      supplied. The standard input and output of the external program
      will be connected to the serial port. The standard error of the
      external program will be connected to the terminal which---while
      the program is running---will revert to canonical mode. Pressing
      'C-c' while the external program is running will prematurely
      terminate it, and return control to picocom. Pressing
      'C-c' at any other time, has no special effect; the character is
      normally passed to the serial port.
    </p>
      
  


  <h2>INPUT, OUTPUT, AND ECHO MAPPING</h2>

    <p>
      Using the <em>--imap</em>, <em>--omap</em>, and
      <em>--emap</em> options you can make picocom map
      (tranlate, replace) certain special characters after being read
      from the serial port (with <em>--imap</em>), before being
      written to the serial port (with <em>--omap</em>), and before
      being locally echoed to the terminal (standard output) if local
      echo is enabled (with <em>--emap</em>). These mapping options
      take, each, a single argument which is a comma-separated list of
      one or more of the following identifiers: &quot;crlf&quot; (map CR to LF),
      &quot;crcrlf&quot; (map CR to CR + LF), &quot;igncr&quot; (ignore CR), &quot;lfcr&quot; (map
      LF to CR), &quot;lfcrlf&quot; (map LF to CR + LF), &quot;ignlf&quot; (ignore LF),
      &quot;bsdel&quot; (map BS --&gt; DEL), &quot;delbs&quot; (map DEL --&gt; BS)
    </p>

    <p>
      For example the command:
    </p>
    <p>
      picocom --omap crlf,delbs --imap inglf,bsdel --emap crcrlf ...
    </p>
    <p>
      will: Replace every CR (carriage return, 0x0d) caracter with LF
      (line feed, 0x0a) and every DEL (delete, 0x7f) character with BS
      (backspace, 0x08) before writing it to the serial port. Ignore
      (not write to the terminal) every LF character read from the
      serial port and replace every BS character read from the serial
      port with DEL. Replace every CR character with CR and LF when
      echoing to the terminal (if local-echo is enabled).
    </p>
  

  
  <h2>Options</h2>

    <p> 
      picocom accepts the following command-line options
    </p>
    
    
      <b><p>--baud | -b</p></b>
      
	<p>
	  Defines the baud-rate to set the serial-port (terminal) to.
	</p>
      
    

    
      <b><p>--flow | -f</p></b>
      
	<p>
	  Defines the flow-control mode to set the serial-port
	  to. Must be one of: 'x' for xon/xoff (software) mode, 'h'
	  for hardware flow control (RTS/CTS), 'n' for no flow
	  control. (Default: 'n')
	</p>
      
    
    
    
      <b><p>--parity | -p</p></b>
      
	<p>
	  Defines the parity mode to set the serial-port to.  Must be
	  one of: 'o' for odd parity mode, 'e' for even parity mode,
	  'n' for no parity mode. (Default: 'n')
	</p>
      
    
    
    
      <b><p>--databits | -d</p></b>
      
	<p>
	  Defines the number of data bits in every character. Must be
	  one of: 5, 6, 7, 8. (Default: 8)
	</p>
      
    
    
    
      <b><p>--esacpe | -e</p></b>
      
	<p>
	  Defines the character that will make picocom enter
	  command-mode (see description above). If 'x' is given, then
	  C-x will make picocom enter command mode. (Default: 'a')
	</p>
      
    
    
    
      <b><p>--echo | -c</p></b>
      
	<p>
	  Enable local echo. Every character being read from the
	  terminal (standard input) is echoed to the terminal
	  (standard output) subject to the echo-mapping configuration
	  (see <em>--emap</em> option. (Default: Disabled)
	</p>
      
    
    
    
      <b><p>--noinit | -i</p></b>
      
	<p>
	  If given, picocom will not initialize, reset, or
	  otherwise meddle with the serial port at start-up. It will
	  just open it. This is useful, for example, for connecting
	  picocom to already-connected modems, or already
	  configured ports without terminating the connection, or
	  altering the settings. If required serial port parameters
	  can then be adjusted at run-time by commands.
	</p>
      
    
    
    
      <b><p>--noreset | -r</p></b>
      
	<p>
	  If given, picocom will not *reset* the serial port
	  when exiting. It will just close the filedes and do nothing
	  more. This is useful, for example, for leaving modems
	  connected when exiting picocom. Regardless whether
	  the <em>--noreset</em> option is given the user can exit
	  picocom using the &quot;Quit&quot; command (instead of &quot;Exit&quot;),
	  which never resets the serial port. If <em>--noreset</em>
	  is given then &quot;Quit&quot; and &quot;Exit&quot; behave essentially the same.
	</p>
      
    
    
    
      <b><p>--nolock | -l</p></b>
      
	<p>
	  If given, picocom will *not* attempt to lock the
	  serial port before opening it. Normally picocom attempts to
	  get a UUCP-style lock-file (e.g. &quot;/var/lock/LCK..ttyS0&quot;)
	  before opening the port. Failing to do so, results in the
	  program exiting after emitting an error-message. It is
	  possible that your picocom binary is compiled without this
	  option.
	</p>
      
    
    
    
      <b><p>--send-cmd | -s</p></b>
      
	<p>
	  Specifies the external program (and any arguments to it)
	  that will be used for transmitting files. (Default: &quot;sz
	  -vv&quot;)
	</p>
      
    
    
    
      <b><p>--receive-cmd | -v</p></b>
      
	<p> 
	  Specifies the external program (and any arguments to it)
	  that will be used for receiving files. (Default: &quot;rz -vv&quot;)
	</p>
      
    
    
    
      <b><p>--imap</p></b>
      
	<p>
	  Specifies the input character map (i.e. special characters
	  to be replaced when read from the serial port). Example:
	  &quot;--imap crlf,delbs&quot;. (Defaul: Empty)
	</p>
      
    
    
    
      <b><p>--omap</p></b>
      
	<p>
	  Specifies the output character map (i.e. special characters
	  to be replaced before being written to serial
	  port). Example: &quot;--omap crcrlf,bsdel&quot;. (Defaul: Empty)
	</p>
      
    
    
    
      <b><p>--emap</p></b>
      
	<p>
	  Specifies the local-echo character map (i.e. special
	  characters to be replaced before being echoed-back to the
	  terminal, if local-echo is enabled). Example: &quot;--emap
	  crcrlf,bsdel&quot;. (Defaul: delbs,crcrlf)
	</p>
      
    
    
    
      <b><p>--help | -h</p></b>
      
	<p>
	  Print a short help message describing the command-line
	  options.
	</p>
      
    
  
  
  
  <h2>AUTHOR</h2>

    <p>picocom was written by Nick Patavalis (npat@efault.net)</p>
  


  <h2>AVAILABILITY</h2>

    <p>The latest version of &quot;picocom&quot; can be downloaded from: <a href = "http://code.google.com/p/picocom/">http://code.google.com/p/picocom/</a>
    </p>
  


</td></tr></table></center>
</body>
